package org.timecontrol.db;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

public class DataFileJDBC {

	public Statement openConnection(){
		Connection conn = null;
		Statement stmt = null;

		try {
			Class.forName("com.mysql.jdbc.Driver").newInstance();
			// Base de Datos Local
			String connectionUrl = "jdbc:mysql://localhost:3306/mysql";
			String connectionUser = "root";
			String connectionPassword = "root";
			
			// Base de Datos Server
//			String connectionUrl = "jdbc:mysql://localhost:3306/rjngjitr_bolten0";
//			String connectionUser = "rjngjitr_root1";
//			String connectionPassword = "rjngjitr_root1";

			conn = DriverManager.getConnection(connectionUrl, connectionUser, connectionPassword);
			stmt = conn.createStatement();

		} catch (Exception e) {
			e.printStackTrace();
		} 
		return stmt;
	}
}